#!/bin/bash
#

read -p "用户名" name

id $name &> /dev/null
if [ $? -eq 0 ]; then
	echo "用户${name}存在"
else
	useradd $name
	echo "123" | passwd --stdin $name &> /dev/null
	echo "用户${name}创建完成，初始密码为123"
fi


